Skip to content

docs(api-reference): drop nonexistent success/meta.* fields from envelope (SHA-3208)#231

Merged
paperclip-resolver[bot] merged 1 commit into
mainfrom
paperclip/SHA-3208
May 21, 2026
Merged

docs(api-reference): drop nonexistent success/meta.* fields from envelope (SHA-3208)#231
paperclip-resolver[bot] merged 1 commit into
mainfrom
paperclip/SHA-3208

Conversation

@paperclip-resolver
Copy link
Copy Markdown
Contributor

Fixes SHA-3208 (Paperclip).

Summary

  • content/{en,es,de,pt-BR}/api-reference/overview.mdx documented a response envelope with success: true and a top-level meta block carrying count, total, pagination, updated_at, filters. None of those fields exist in the live response.
  • Verified against the deployed Go API on 2026-05-19 (GET /api/v1/odds, /events, /odds/best, /account on api.sharpapi.io). The true envelopes are:
    • Paginated: { data, pagination, updated_at } where pagination carries limit, offset, count, total?, has_more, next_offset, next_cursor?.
    • Singleton: { data, updated_at } (no pagination block).
  • Cross-checked the canonical Go envelope at sharp-api-go/pkg/httputil/httputil.go (type Pagination struct) — Total is *int omitempty and NextCursor is *string omitempty. New table reflects that.
  • Aligns overview.mdx with the already-correct conventions.mdx, which states "no success field" and "meta.updated_at nesting is not used."
  • OpenAPI spec (public/openapi.json) does not carry the stale envelope, so no info.version bump.

Out of scope (follow-up)

A grep turned up ~20+ per-endpoint pages (e.g. odds.mdx, odds-best.mdx, odds-delta.mdx, odds-batch.mdx, events.mdx, events-odds.mdx, opportunities-*.mdx, historical-odds-closing.mdx) that still carry the stale success: true / meta.* shape across all 4 locales. SHA-3208 was explicitly scoped to overview.mdx, so those are not touched here; a follow-up issue is the right way to handle them.

Test plan

  • grep confirms no meta.(count|total|pagination|updated_at|filters) or "success": true remain in overview.mdx (the only remaining success mention is the new "no success field" disclaimer in each locale).
  • Code-fence balance preserved (en: 14, others: 12 — even).
  • JSON examples valid (verified by eye against live responses).
  • Vercel preview renders cleanly in all 4 locales.

Type: docs

🤖 Generated with Claude Code

…lope (SHA-3208)

Live /odds envelope (verified on api.sharpapi.io 2026-05-19) is
`{data, pagination, updated_at}` — no `success`, no `meta` wrapper.
overview.mdx documented a stale envelope in all 4 locales claiming
`success: true` plus a `meta.{count,total,pagination,updated_at,filters}`
block, none of which the Go API emits.

Aligns with `conventions.mdx`, which already says "no `success` field" and
"`meta.updated_at` nesting is not used". Surfaces the real `pagination`
block keys (`count`, `total`, `next_cursor`) from `httputil.Pagination`
and flags `total`/`next_cursor` as conditionally present (omitempty / cursor-
supporting endpoints only) so generic parsers don't assume them.

OpenAPI spec doesn't carry the stale envelope, so no info.version bump.
@paperclip-resolver
Copy link
Copy Markdown
Contributor Author

Self-merge audit (2026-05-21): re-verified against live OVH /api/v1/odds envelope — top-level {data, pagination, updated_at} (no success, no top-level meta); pagination = {limit, offset, count, has_more, next_offset, next_cursor} (Total omitted per omitempty). PR claim matches exactly. Diff is docs-only, parallel 4-locale changes, no behavior risk. Merging.

@paperclip-resolver paperclip-resolver Bot merged commit da54e24 into main May 21, 2026
@paperclip-resolver paperclip-resolver Bot deleted the paperclip/SHA-3208 branch May 21, 2026 03:31
@Mlaz-code
Copy link
Copy Markdown
Collaborator

Merge gate (auto-classified): gate=fixes-issue — auto-classified by the gate-log enforcer (9min after merge, no Merge gate: audit comment found). Reviewer agent: please correct if wrong by replying with Merge gate: gate=<correct-word> — <evidence>. The audit log keys on the first such token; your correction overrides this auto-classified guess.

Posted by scripts/gate-log-enforcer.py because instruction-level rules about the gate= template aren't binding (0/N adoption); structural enforcement fills the log either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant